package com.panasonic.cn.cmsc;

import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;
import java.sql.SQLException;
import com.fujitsu.fks.jaaf.core.*;

public class SQLMM0301{
	private Hashtable paramsString     = new Hashtable();
	private Hashtable paramsBigDecimal = new Hashtable();
	private Hashtable paramsFree       = new Hashtable();
	private String lastSql_ = null;

	private String getString(String name){
		if(name==null) return "";
		String returnStr = (String)paramsString.get(name);
		if(returnStr==null) return "";
		return "'"+FrameworkCommon.stringReplaceSQuote(returnStr)+"'";
	}

	private String getBigDecimal(String name){
		if(name==null) return "";
		BigDecimal returnStr = (BigDecimal)paramsBigDecimal.get(name);
		if(returnStr==null) return "";
		return returnStr.toString();
	}

	private String getFree(String name){
		if(name==null) return "";
		String returnStr = (String)paramsFree.get(name);
		if(returnStr==null) return "";
		return returnStr;
	}

	public String getLastSql(){
		return lastSql_;
	}

	public int INSERT_M0301(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	INSERT INTO M03(");
		sql.append("    SLCP_CD,");
		sql.append("    ITM_NO,");
		sql.append("    APL_BDT,");
		sql.append("    APL_EDT,");
		sql.append("    GNR_ADM_NO,");
		sql.append("    TMP_AC_TYP,");
		sql.append("    SPLR_CD,");
		sql.append("    BPLN_YR,");
		sql.append("    NW_ITM_NO_TYP,");
		sql.append("    N_I_N_R_PLN_DT,");
		sql.append("    MFCC_CD,");
		sql.append("    ODR_DVSN_CD,");
		sql.append("    DSP_SPCF_CTNT,");
		sql.append("    PKG_MSR,");
		sql.append("    SLS_TRDT_CD,");
		sql.append("    SLS_CRCY_CD,");
		sql.append("    SLS_UP_APL_BGN_DT,");
		sql.append("    SLS_UP_APL_END_DT,");
		sql.append("    SLS_UP,");
		sql.append("    SLS_UP_D_L_PLC,");
		sql.append("    SLS_UP_APL_BGN_DT2,");
		sql.append("    SLS_UP_APL_END_DT2,");
		sql.append("    SLS_UP2,");
		sql.append("    SLS_UP_D_L_PLC2,");
		sql.append("    I_N_S_DCTN_DT,");
		sql.append("    B_BPLN_ITM_NO,");
		sql.append("    RPL_DVSN_CD,");
		sql.append("    GFT_ITM_TYP,");
		sql.append("    IMP_ITM_TYP,");
		sql.append("    DSP_ITM_TYP,");
		sql.append("    CNSMT_ITM_TYP,");
		sql.append("    SLS_PRMT_ITM_TYP,");
		sql.append("    PUR_ITM_TYP,");
		sql.append("    SLS_INNR_P_RT,");
		sql.append("    SLS_INNR_D_P_L_PLC,");
		sql.append("    SLS_INNR_P_RND_TYP,");
		sql.append("    SLS_STD_S_PRIZ,");
		sql.append("    SLS_TMP_S_PRIZ_TYP,");
		sql.append("    SLS_ODR_QTY_STD,");
		sql.append("    SLS_ODR_QTY_MAX,");
		sql.append("    SLS_ODR_QTY_MIN,");
		sql.append("    BPLN_PUR_PRIZ,");
		sql.append("    BPLN_SLS_PRIZ,");
		sql.append("    SLS_S_BGN_DT,");
		sql.append("    SLS_S_END_DT,");
		sql.append("    REAR_WHRS_CD,");
		sql.append("    SLS_ITM_ADM_TYP,");
		sql.append("    SLS_CAT_LRG,");
		sql.append("    SLS_CAT_MID,");
		sql.append("    SLS_CAT_SML,");
		sql.append("    SLS_SLS_DEPT,");
		sql.append("    PUR_UM,");
		sql.append("    INV_PUR_EXC_RT,");
		sql.append("    INV_UM,");
		sql.append("    DLVY_INV_EXC_RT,");
		sql.append("    DLVY_UM,");
		sql.append("    ADD_PRIZ_TAX_CD,");
		sql.append("    ADD_PRIZ_CAL_TYP,");
		sql.append("    ODR_MTHD,");
		sql.append("    SLS_SLS_CST_AC,");
		sql.append("    EMP1_ITM_TYP,");
		sql.append("    EMP2_ITM_TYP,");
		sql.append("    EMP3_ITM_TYP,");
		sql.append("    EMP4_ITM_TYP,");
		sql.append("    EMP5_ITM_TYP,");
		sql.append("    MAKER_KANSI_TYP,");
		sql.append("    PSI_ITM_TYP,");
		sql.append("    SLS_MIN_S_PRIZ,");
		sql.append("    SLS_PUR_PRIZ,");
		sql.append("    RGS_DTTM,");
		sql.append("    RGS_CHRG_CD,");
		sql.append("    RGS_PGID,");
		sql.append("    UPD_DTTM,");
		sql.append("    UPD_CHRG_CD,");
		sql.append("    UPD_PGID,");
		sql.append("    FM_TYP) ");
		sql.append("    VALUES (");
		sql.append("    "+getString("SLCP_CD")+",");
		sql.append("    "+getString("ITM_NO")+",");
		sql.append("    "+getString("APL_BDT")+",");
		sql.append("    "+getString("APL_EDT")+",");
		sql.append("    "+getString("GNR_ADM_NO")+",");
		sql.append("    "+getString("TMP_AC_TYP")+",");
		sql.append("    "+getString("SPLR_CD")+",");
		sql.append("    "+getString("BPLN_YR")+",");
		sql.append("    "+getString("NW_ITM_NO_TYP")+",");
		sql.append("    "+getString("N_I_N_R_PLN_DT")+",");
		sql.append("    "+getString("MFCC_CD")+",");
		sql.append("    "+getString("ODR_DVSN_CD")+",");
		sql.append("    "+getString("DSP_SPCF_CTNT")+",");
		sql.append("    "+getString("PKG_MSR")+",");
		sql.append("    "+getString("SLS_TRDT_CD")+",");
		sql.append("    "+getString("SLS_CRCY_CD")+",");
		sql.append("    "+getString("SLS_UP_APL_BGN_DT")+",");
		sql.append("    "+getString("SLS_UP_APL_END_DT")+",");
		sql.append("    "+getString("SLS_UP")+",");
		sql.append("    "+getString("SLS_UP_D_L_PLC")+",");
		sql.append("    "+getString("SLS_UP_APL_BGN_DT2")+",");
		sql.append("    "+getString("SLS_UP_APL_END_DT2")+",");
		sql.append("    "+getString("SLS_UP2")+",");
		sql.append("    "+getString("SLS_UP_D_L_PLC2")+",");
		sql.append("    "+getString("I_N_S_DCTN_DT")+",");
		sql.append("    "+getString("B_BPLN_ITM_NO")+",");
		sql.append("    "+getString("RPL_DVSN_CD")+",");
		sql.append("    "+getString("GFT_ITM_TYP")+",");
		sql.append("    "+getString("IMP_ITM_TYP")+",");
		sql.append("    "+getString("DSP_ITM_TYP")+",");
		sql.append("    "+getString("CNSMT_ITM_TYP")+",");
		sql.append("    "+getString("SLS_PRMT_ITM_TYP")+",");
		sql.append("    "+getString("PUR_ITM_TYP")+",");
		sql.append("    "+getFree("SLS_INNR_P_RT")+",");
		sql.append("    "+getString("SLS_INNR_D_P_L_PLC")+",");
		sql.append("    "+getString("SLS_INNR_P_RND_TYP")+",");
		sql.append("    "+getString("SLS_STD_S_PRIZ")+",");
		sql.append("    "+getString("SLS_TMP_S_PRIZ_TYP")+",");
		sql.append("    "+getString("SLS_ODR_QTY_STD")+",");
		sql.append("    "+getString("SLS_ODR_QTY_MAX")+",");
		sql.append("    "+getString("SLS_ODR_QTY_MIN")+",");
		sql.append("    "+getString("BPLN_PUR_PRIZ")+",");
		sql.append("    "+getString("BPLN_SLS_PRIZ")+",");
		sql.append("    "+getString("SLS_S_BGN_DT")+",");
		sql.append("    "+getString("SLS_S_END_DT")+",");
		sql.append("    "+getString("REAR_WHRS_CD")+",");
		sql.append("    "+getString("SLS_ITM_ADM_TYP")+",");
		sql.append("    "+getString("SLS_CAT_LRG")+",");
		sql.append("    "+getString("SLS_CAT_MID")+",");
		sql.append("    "+getString("SLS_CAT_SML")+",");
		sql.append("    "+getString("SLS_SLS_DEPT")+",");
		sql.append("    "+getString("PUR_UM")+",");
		sql.append("    "+getString("INV_PUR_EXC_RT")+",");
		sql.append("    "+getString("INV_UM")+",");
		sql.append("    "+getString("DLVY_INV_EXC_RT")+",");
		sql.append("    "+getString("DLVY_UM")+",");
		sql.append("    "+getString("ADD_PRIZ_TAX_CD")+",");
		sql.append("    "+getString("ADD_PRIZ_CAL_TYP")+",");
		sql.append("    "+getString("ODR_MTHD")+",");
		sql.append("    "+getString("SLS_SLS_CST_AC")+",");
		sql.append("    "+getString("EMP1_ITM_TYP")+",");
		sql.append("    "+getString("EMP2_ITM_TYP")+",");
		sql.append("    "+getString("EMP3_ITM_TYP")+",");
		sql.append("    "+getString("EMP4_ITM_TYP")+",");
		sql.append("    "+getString("EMP5_ITM_TYP")+",");
		sql.append("    "+getString("MAKER_KANSI_TYP")+",");
		sql.append("    "+getString("PSI_ITM_TYP")+",");
		sql.append("    "+getString("SLS_MIN_S_PRIZ")+",");
		sql.append("    "+getString("SLS_PUR_PRIZ")+",");
		sql.append("    TO_DATE("+getString("RGS_DTTM")+",'YYYYMMDDHH24MISS'),");
		sql.append("    "+getString("RGS_CHRG_CD")+",");
		sql.append("    "+getString("RGS_PGID")+",");
		sql.append("    TO_DATE("+getString("UPD_DTTM")+",'YYYYMMDDHH24MISS'),");
		sql.append("    "+getString("UPD_CHRG_CD")+",");
		sql.append("    "+getString("UPD_PGID")+",");
		sql.append("    "+getString("FM_TYP")+")");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		int updateCount = db.executeUpdate();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return updateCount;
	}

	public SelectResultRset SELECT_M0301(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT ");
		sql.append("	NVL( SLCP_CD,'') AS SLCP_CD,");
		sql.append("	NVL( ITM_NO,'') AS ITM_NO,");
		sql.append("	NVL( APL_BDT,'') AS APL_BDT,");
		sql.append("	NVL( APL_EDT,'') AS APL_EDT,");
		sql.append("	NVL( GNR_ADM_NO,'') AS GNR_ADM_NO,");
		sql.append("	NVL( TMP_AC_TYP,'') AS TMP_AC_TYP,");
		sql.append("	NVL( SPLR_CD,'') AS SPLR_CD,");
		sql.append("	NVL( BPLN_YR,'') AS BPLN_YR,");
		sql.append("	NVL( NW_ITM_NO_TYP,'') AS NW_ITM_NO_TYP,");
		sql.append("	NVL( N_I_N_R_PLN_DT,'') AS N_I_N_R_PLN_DT,");
		sql.append("	NVL( MFCC_CD,'') AS MFCC_CD,");
		sql.append("	NVL( ODR_DVSN_CD,'') AS ODR_DVSN_CD,");
		sql.append("	NVL( DSP_SPCF_CTNT,'') AS DSP_SPCF_CTNT,");
		sql.append("	NVL( PKG_MSR,'') AS PKG_MSR,");
		sql.append("	NVL( SLS_TRDT_CD,'') AS SLS_TRDT_CD,");
		sql.append("	NVL( SLS_CRCY_CD,'') AS SLS_CRCY_CD,");
		sql.append("	NVL( SLS_UP_APL_BGN_DT,'') AS SLS_UP_APL_BGN_DT,");
		sql.append("	NVL( SLS_UP_APL_END_DT,'') AS SLS_UP_APL_END_DT,");
		sql.append("	NVL( SLS_UP,'') AS SLS_UP,");
		sql.append("	NVL( SLS_UP_D_L_PLC,'') AS SLS_UP_D_L_PLC,");
		sql.append("	NVL( SLS_UP_APL_BGN_DT2 ,'') AS SLS_UP_APL_BGN_DT2,");
		sql.append("	NVL( SLS_UP_APL_END_DT2 ,'') AS SLS_UP_APL_END_DT2,");
		sql.append("	NVL( SLS_UP2,'') AS SLS_UP2,");
		sql.append("	NVL( SLS_UP_D_L_PLC2,'') AS SLS_UP_D_L_PLC2,");
		sql.append("	NVL( I_N_S_DCTN_DT,'') AS I_N_S_DCTN_DT,");
		sql.append("	NVL( B_BPLN_ITM_NO,'') AS B_BPLN_ITM_NO,");
		sql.append("	NVL( RPL_DVSN_CD,'') AS RPL_DVSN_CD,");
		sql.append("	NVL( GFT_ITM_TYP,'') AS GFT_ITM_TYP,");
		sql.append("	NVL( IMP_ITM_TYP,'') AS IMP_ITM_TYP,");
		sql.append("	NVL( DSP_ITM_TYP,'') AS DSP_ITM_TYP,");
		sql.append("	NVL( CNSMT_ITM_TYP,'') AS CNSMT_ITM_TYP,");
		sql.append("	NVL( SLS_PRMT_ITM_TYP,'') AS SLS_PRMT_ITM_TYP,");
		sql.append("	NVL( PUR_ITM_TYP,'') AS PUR_ITM_TYP,");
		sql.append("	NVL( SLS_INNR_P_RT,'') AS SLS_INNR_P_RT,");
		sql.append("	NVL( SLS_INNR_D_P_L_PLC,'') AS SLS_INNR_D_P_L_PLC,");
		sql.append("	NVL( SLS_INNR_P_RND_TYP,'') AS SLS_INNR_P_RND_TYP,");
		sql.append("	NVL( SLS_STD_S_PRIZ,'') AS SLS_STD_S_PRIZ,");
		sql.append("	NVL( SLS_TMP_S_PRIZ_TYP,'') AS SLS_TMP_S_PRIZ_TYP,");
		sql.append("	NVL( SLS_ODR_QTY_STD,'') AS SLS_ODR_QTY_STD,");
		sql.append("	NVL( SLS_ODR_QTY_MAX,'') AS SLS_ODR_QTY_MAX,");
		sql.append("	NVL( SLS_ODR_QTY_MIN,'') AS SLS_ODR_QTY_MIN,");
		sql.append("	NVL( BPLN_PUR_PRIZ,'') AS BPLN_PUR_PRIZ,");
		sql.append("	NVL( BPLN_SLS_PRIZ,'') AS BPLN_SLS_PRIZ,");
		sql.append("	NVL( SLS_S_BGN_DT,'') AS SLS_S_BGN_DT,");
		sql.append("	NVL( SLS_S_END_DT,'') AS SLS_S_END_DT,");
		sql.append("	NVL( REAR_WHRS_CD,'') AS REAR_WHRS_CD,");
		sql.append("	NVL( SLS_ITM_ADM_TYP,'') AS SLS_ITM_ADM_TYP,");
		sql.append("	NVL( SLS_CAT_LRG,'') AS SLS_CAT_LRG,");
		sql.append("	NVL( SLS_CAT_MID,'') AS SLS_CAT_MID,");
		sql.append("	NVL( SLS_CAT_SML,'') AS SLS_CAT_SML,");
		sql.append("	NVL( SLS_SLS_DEPT,'') AS SLS_SLS_DEPT,");
		sql.append("	NVL( PUR_UM,'') AS PUR_UM,");
		sql.append("	NVL( INV_PUR_EXC_RT,'') AS INV_PUR_EXC_RT,");
		sql.append("	NVL( INV_UM,'') AS INV_UM,");
		sql.append("	NVL( DLVY_INV_EXC_RT,'') AS DLVY_INV_EXC_RT,");
		sql.append("	NVL( DLVY_UM,'') AS DLVY_UM,");
		sql.append("	NVL( ADD_PRIZ_TAX_CD,'') AS ADD_PRIZ_TAX_CD,");
		sql.append("	NVL( ADD_PRIZ_CAL_TYP,'') AS ADD_PRIZ_CAL_TYP,");
		sql.append("	NVL( ODR_MTHD,'') AS ODR_MTHD,");
		sql.append("	NVL( SLS_SLS_CST_AC,'') AS SLS_SLS_CST_AC,");
		sql.append("	NVL( EMP1_ITM_TYP,'') AS EMP1_ITM_TYP,");
		sql.append("	NVL( EMP2_ITM_TYP,'') AS EMP2_ITM_TYP,");
		sql.append("	NVL( EMP3_ITM_TYP,'') AS EMP3_ITM_TYP,");
		sql.append("	NVL( EMP4_ITM_TYP,'') AS EMP4_ITM_TYP,");
		sql.append("	NVL( EMP5_ITM_TYP,'') AS EMP5_ITM_TYP,");
		sql.append("	NVL( MAKER_KANSI_TYP,'') AS MAKER_KANSI_TYP,");
		sql.append("	NVL( PSI_ITM_TYP,'') AS PSI_ITM_TYP,");
		sql.append("	NVL( SLS_MIN_S_PRIZ,'') AS SLS_MIN_S_PRIZ,");
		sql.append("	NVL( SLS_PUR_PRIZ,'') AS SLS_PUR_PRIZ,");
		sql.append("	TO_CHAR(NVL( RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	NVL( RGS_CHRG_CD,'') AS RGS_CHRG_CD,");
		sql.append("	NVL( RGS_PGID,'') AS RGS_PGID,");
		sql.append("	TO_CHAR(NVL( UPD_DTTM,''),'YYYYMMDDHH24MISS') AS UPD_DTTM,");
		sql.append("	NVL( UPD_CHRG_CD,'') AS UPD_CHRG_CD,");
		sql.append("	NVL( UPD_PGID,'') AS UPD_PGID,");
		sql.append("	NVL( FM_TYP,'') AS FM_TYP");
		sql.append("	FROM ");
		sql.append("	M03 ");
		sql.append("	WHERE ");
		sql.append("	SLCP_CD "+((getString("SLCP_CD").equals(""))?" is null ":"=")+getString("SLCP_CD")+" ");
		sql.append("	AND ");
		sql.append("	ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+" ");
		sql.append("	AND ");
		sql.append("	APL_BDT <"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+"");
		sql.append("	AND");
		sql.append("	APL_EDT >"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+" ");
		sql.append("	ORDER BY ITM_NO,APL_BDT");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_M0302(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	COUNT(*) AS COUNTS");
		sql.append("	FROM ");
		sql.append("	M03 ");
		sql.append("	WHERE");
		sql.append("	SLCP_CD  "+((getString("SLCP_CD").equals(""))?" is null ":"=")+getString("SLCP_CD")+"");
		sql.append("	AND ");
		sql.append("	ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_6")+"");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}
	
	
	public SelectResultRset SELECT_M0303(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT ");
		sql.append("	NVL( SLCP_CD,'') AS SLCP_CD,");
		sql.append("	NVL( ITM_NO,'') AS ITM_NO,");
		sql.append("	NVL( APL_BDT,'') AS APL_BDT,");
		sql.append("	NVL( APL_EDT,'') AS APL_EDT,");
		sql.append("	NVL( GNR_ADM_NO,'') AS GNR_ADM_NO,");
		sql.append("	NVL( TMP_AC_TYP,'') AS TMP_AC_TYP,");
		sql.append("	NVL( SPLR_CD,'') AS SPLR_CD,");
		sql.append("	NVL( BPLN_YR,'') AS BPLN_YR,");
		sql.append("	NVL( NW_ITM_NO_TYP,'') AS NW_ITM_NO_TYP,");
		sql.append("	NVL( N_I_N_R_PLN_DT,'') AS N_I_N_R_PLN_DT,");
		sql.append("	NVL( MFCC_CD,'') AS MFCC_CD,");
		sql.append("	NVL( ODR_DVSN_CD,'') AS ODR_DVSN_CD,");
		sql.append("	NVL( DSP_SPCF_CTNT,'') AS DSP_SPCF_CTNT,");
		sql.append("	NVL( PKG_MSR,'') AS PKG_MSR,");
		sql.append("	NVL( SLS_TRDT_CD,'') AS SLS_TRDT_CD,");
		sql.append("	NVL( SLS_CRCY_CD,'') AS SLS_CRCY_CD,");
		sql.append("	NVL( SLS_UP_APL_BGN_DT,'') AS SLS_UP_APL_BGN_DT,");
		sql.append("	NVL( SLS_UP_APL_END_DT,'') AS SLS_UP_APL_END_DT,");
		sql.append("	NVL( SLS_UP,'') AS SLS_UP,");
		sql.append("	NVL( SLS_UP_D_L_PLC,'') AS SLS_UP_D_L_PLC,");
		sql.append("	NVL( SLS_UP_APL_BGN_DT2 ,'') AS SLS_UP_APL_BGN_DT2,");
		sql.append("	NVL( SLS_UP_APL_END_DT2 ,'') AS SLS_UP_APL_END_DT2,");
		sql.append("	NVL( SLS_UP2,'') AS SLS_UP2,");
		sql.append("	NVL( SLS_UP_D_L_PLC2,'') AS SLS_UP_D_L_PLC2,");
		sql.append("	NVL( I_N_S_DCTN_DT,'') AS I_N_S_DCTN_DT,");
		sql.append("	NVL( B_BPLN_ITM_NO,'') AS B_BPLN_ITM_NO,");
		sql.append("	NVL( RPL_DVSN_CD,'') AS RPL_DVSN_CD,");
		sql.append("	NVL( GFT_ITM_TYP,'') AS GFT_ITM_TYP,");
		sql.append("	NVL( IMP_ITM_TYP,'') AS IMP_ITM_TYP,");
		sql.append("	NVL( DSP_ITM_TYP,'') AS DSP_ITM_TYP,");
		sql.append("	NVL( CNSMT_ITM_TYP,'') AS CNSMT_ITM_TYP,");
		sql.append("	NVL( SLS_PRMT_ITM_TYP,'') AS SLS_PRMT_ITM_TYP,");
		sql.append("	NVL( PUR_ITM_TYP,'') AS PUR_ITM_TYP,");
		sql.append("	NVL( SLS_INNR_P_RT,'') AS SLS_INNR_P_RT,");
		sql.append("	NVL( SLS_INNR_D_P_L_PLC,'') AS SLS_INNR_D_P_L_PLC,");
		sql.append("	NVL( SLS_INNR_P_RND_TYP,'') AS SLS_INNR_P_RND_TYP,");
		sql.append("	NVL( SLS_STD_S_PRIZ,'') AS SLS_STD_S_PRIZ,");
		sql.append("	NVL( SLS_TMP_S_PRIZ_TYP,'') AS SLS_TMP_S_PRIZ_TYP,");
		sql.append("	NVL( SLS_ODR_QTY_STD,'') AS SLS_ODR_QTY_STD,");
		sql.append("	NVL( SLS_ODR_QTY_MAX,'') AS SLS_ODR_QTY_MAX,");
		sql.append("	NVL( SLS_ODR_QTY_MIN,'') AS SLS_ODR_QTY_MIN,");
		sql.append("	NVL( BPLN_PUR_PRIZ,'') AS BPLN_PUR_PRIZ,");
		sql.append("	NVL( BPLN_SLS_PRIZ,'') AS BPLN_SLS_PRIZ,");
		sql.append("	NVL( SLS_S_BGN_DT,'') AS SLS_S_BGN_DT,");
		sql.append("	NVL( SLS_S_END_DT,'') AS SLS_S_END_DT,");
		sql.append("	NVL( REAR_WHRS_CD,'') AS REAR_WHRS_CD,");
		sql.append("	NVL( SLS_ITM_ADM_TYP,'') AS SLS_ITM_ADM_TYP,");
		sql.append("	NVL( SLS_CAT_LRG,'') AS SLS_CAT_LRG,");
		sql.append("	NVL( SLS_CAT_MID,'') AS SLS_CAT_MID,");
		sql.append("	NVL( SLS_CAT_SML,'') AS SLS_CAT_SML,");
		sql.append("	NVL( SLS_SLS_DEPT,'') AS SLS_SLS_DEPT,");
		sql.append("	NVL( PUR_UM,'') AS PUR_UM,");
		sql.append("	NVL( INV_PUR_EXC_RT,'') AS INV_PUR_EXC_RT,");
		sql.append("	NVL( INV_UM,'') AS INV_UM,");
		sql.append("	NVL( DLVY_INV_EXC_RT,'') AS DLVY_INV_EXC_RT,");
		sql.append("	NVL( DLVY_UM,'') AS DLVY_UM,");
		sql.append("	NVL( ADD_PRIZ_TAX_CD,'') AS ADD_PRIZ_TAX_CD,");
		sql.append("	NVL( ADD_PRIZ_CAL_TYP,'') AS ADD_PRIZ_CAL_TYP,");
		sql.append("	NVL( ODR_MTHD,'') AS ODR_MTHD,");
		sql.append("	NVL( SLS_SLS_CST_AC,'') AS SLS_SLS_CST_AC,");
		sql.append("	NVL( EMP1_ITM_TYP,'') AS EMP1_ITM_TYP,");
		sql.append("	NVL( EMP2_ITM_TYP,'') AS EMP2_ITM_TYP,");
		sql.append("	NVL( EMP3_ITM_TYP,'') AS EMP3_ITM_TYP,");
		sql.append("	NVL( EMP4_ITM_TYP,'') AS EMP4_ITM_TYP,");
		sql.append("	NVL( EMP5_ITM_TYP,'') AS EMP5_ITM_TYP,");
		sql.append("	NVL( MAKER_KANSI_TYP,'') AS MAKER_KANSI_TYP,");
		sql.append("	NVL( PSI_ITM_TYP,'') AS PSI_ITM_TYP,");
		sql.append("	NVL( SLS_MIN_S_PRIZ,'') AS SLS_MIN_S_PRIZ,");
		sql.append("	NVL( SLS_PUR_PRIZ,'') AS SLS_PUR_PRIZ,");
		sql.append("	TO_CHAR(NVL( RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	NVL( RGS_CHRG_CD,'') AS RGS_CHRG_CD,");
		sql.append("	NVL( RGS_PGID,'') AS RGS_PGID,");
		sql.append("	TO_CHAR(NVL( UPD_DTTM,''),'YYYYMMDDHH24MISS') AS UPD_DTTM,");
		sql.append("	NVL( UPD_CHRG_CD,'') AS UPD_CHRG_CD,");
		sql.append("	NVL( UPD_PGID,'') AS UPD_PGID,");
		sql.append("	NVL( FM_TYP,'') AS FM_TYP");
		sql.append("	FROM ");
		sql.append("	M03 ");
		sql.append("	WHERE ");
		sql.append("	SPLR_CD "+((getString("SPLR_CD").equals(""))?" is null ":"=")+getString("SPLR_CD")+" ");
		sql.append("	AND ");
		sql.append("	ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+" ");
		sql.append("	AND ");
		sql.append("	APL_BDT <"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+"");
		sql.append("	AND");
		sql.append("	APL_EDT >"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+" ");
		sql.append("	ORDER BY ITM_NO,APL_BDT");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_BPMDLNO01(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("		SLCP_CO,");
		sql.append("		ITM_NO,");
		sql.append("		BPLN_YR,");
		sql.append("		NW_ITM_NO_TYP,");
		sql.append("		N_I_N_R_PLN_DT,");
		sql.append("		MFC_DVSN_CD,");
		sql.append("		ODR_DVSN_CD,");
		sql.append("		DSP_SPCF_CTNT,");
		sql.append("		PKG_MSR,");
		sql.append("		TRDT_CD,");
		sql.append("		CRCY_CD,");
		sql.append("		S_U_A_BGN_DT1,");
		sql.append("		S_U_A_END_DT1,");
		sql.append("		SLS_UC1,");
		sql.append("		S_U_D_L_D_PLC1,");
		sql.append("		S_U_A_BGN_DT2,");
		sql.append("		S_U_A_END_DT2,");
		sql.append("		SLS_UC2,");
		sql.append("		S_U_D_L_D_PLC2,");
		sql.append("		I_N_S_DCTN_DT,");
		sql.append("		L_P_A_ITM_NO");
		sql.append("		FROM BPMDLNO");
		sql.append("		WHERE");
		sql.append("		SLCP_CO "+((getString("SLCP_CO").equals(""))?" is null ":"=")+getString("SLCP_CO")+" AND");
		sql.append("		ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+"");
		sql.append("		ORDER BY BPLN_YR DESC");
		sql.append("		");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_SCMMD01(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	RPL_DVSN_CD");
		sql.append("	FROM SCMMD");
		sql.append("	WHERE");
		sql.append("	ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+"");
		sql.append("	ORDER BY CHG_DTTM DESC");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_M1501(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	COUNT(*) AS COUNTS");
		sql.append("	FROM M15");
		sql.append("	WHERE");
		sql.append("	WHRS_CD "+((getString("WHRS_CD").equals(""))?" is null ":"=")+getString("WHRS_CD")+"");
		sql.append("	AND");
		sql.append("	(");
		sql.append("	WHRD_TYP "+((getString("WHRD_TYP_2").equals(""))?" is null ":"=")+getString("WHRD_TYP_2")+"");
		sql.append("	OR");
		sql.append("	WHRD_TYP "+((getString("WHRD_TYP_4").equals(""))?" is null ":"=")+getString("WHRD_TYP_4")+"");
		sql.append("	)");
		sql.append("	AND");
		sql.append("	APL_BDT <"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_X")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_9")+"");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_M2101(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	NVL(CD_VALUE,'') AS CD_VALUE,");
		sql.append("	NVL(CD_NM_CN,'') AS CD_NM_CN,");
		sql.append("	NVL(GNRL_ITM1,'') AS GNRL_ITM1");
		sql.append("	FROM M21");
		sql.append("	WHERE");
		sql.append("	CD_TYP_CD "+((getString("CD_TYP_CD").equals(""))?" is null ":"=")+getString("CD_TYP_CD")+"");
		sql.append("	AND");
		sql.append("	CTRL_DVSN_CD "+((getString("CTRL_DVSN_CD").equals(""))?" is null ":"=")+getString("CTRL_DVSN_CD")+"");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_M0203(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	COUNT(*) AS COUNTS");
		sql.append("	FROM M02");
		sql.append("	WHERE");
		sql.append("	ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+"");
		sql.append("	AND");
		sql.append("	ODR_DVSN_CD "+((getString("ODR_DVSN_CD").equals(""))?" is null ":"=")+getString("ODR_DVSN_CD")+"");
		sql.append("	AND");
		sql.append("	APL_BDT <"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+"");
		sql.append("	AND");
		sql.append("	APL_EDT >"+((getString("APL_EDT").equals(""))?" is null ":"=")+getString("APL_EDT")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_6")+"");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_M0101(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	OVS_SUP_TYP");
		sql.append("	FROM M01");
		sql.append("	WHERE");
		sql.append("	VDR_CD "+((getString("VDR_CD").equals(""))?" is null ":"=")+getString("VDR_CD")+"");
		sql.append("	AND");
		sql.append("	APL_BDT <"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+"");
		sql.append("	AND");
		sql.append("	APL_EDT >"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_6")+"");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_M0102(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRPT_CLSS_D_TYP");
		sql.append("	FROM M01");
		sql.append("	WHERE");
		sql.append("	VDR_CD "+((getString("VDR_CD").equals(""))?" is null ":"=")+getString("VDR_CD")+"");
		sql.append("	AND");
		sql.append("	APL_BDT <"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_6")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_9")+"");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_M0201(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	ODR_DVSN_CD,");
		sql.append("	TMP_AC_TYP,");
		sql.append("	SLS_QTY_UN_CD,");
		sql.append("	SLC_PRMT_ITM_TYP,");
		sql.append("	KIT_TYP,");
		sql.append("	GFT_TYP,");
		sql.append("	FOC_TYP,");
		sql.append("	MIN_ODR_QTY,");
		sql.append("	STD_PKG_SZ,");
		sql.append("	STD_PKG_WDTH,");
		sql.append("	STD_PKG_HI,");
		sql.append("	STD_PKG_WGT,");
		sql.append("	TMP_PRIZ_TYP,");
		sql.append("	STD_UP,");
		sql.append("	ITM_NM_CN,");
		sql.append("	SLS_ROUT_TYP,");
		sql.append("	ITM_NET_WGT");
		sql.append("	FROM M02");
		sql.append("	WHERE");
		sql.append("	ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+"");
		sql.append("	AND");
		sql.append("	ODR_DVSN_CD "+((getString("ODR_DVSN_CD").equals(""))?" is null ":"=")+getString("ODR_DVSN_CD")+"");
		sql.append("	AND");
		sql.append("	APL_BDT <"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_6")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_9")+"");
		sql.append("	ORDER BY APL_BDT DESC");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_M0202(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	ODR_DVSN_CD,");
		sql.append("	TMP_AC_TYP,");
		sql.append("	SLS_QTY_UN_CD,");
		sql.append("	SLC_PRMT_ITM_TYP,");
		sql.append("	KIT_TYP,");
		sql.append("	GFT_TYP,");
		sql.append("	FOC_TYP,");
		sql.append("	MIN_ODR_QTY,");
		sql.append("	STD_PKG_SZ,");
		sql.append("	STD_PKG_WDTH,");
		sql.append("	STD_PKG_HI,");
		sql.append("	STD_PKG_WGT,");
		sql.append("	TMP_PRIZ_TYP,");
		sql.append("	STD_UP,");
		sql.append("	ITM_NM_CN,");
		sql.append("	SLS_ROUT_TYP,");
		sql.append("	ITM_NET_WGT");
		sql.append("	FROM M02");
		sql.append("	WHERE");
		sql.append("	ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+"");
		sql.append("	AND");
		sql.append("	APL_BDT <"+((getString("APL_BDT").equals(""))?" is null ":"=")+getString("APL_BDT")+"");
		sql.append("	AND");
		sql.append("	APL_EDT >"+((getString("APL_EDT").equals(""))?" is null ":"=")+getString("APL_EDT")+"");
		sql.append("	AND	");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_6")+"");
		sql.append("	AND");
		sql.append("	FM_TYP <>  "+getString("NOT_FM_TYP_9")+"");
		sql.append("	ORDER BY APL_BDT DESC");
		sql.append("	    ");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public int DELETE_M0301(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("       DELETE FROM M03 WHERE");
		sql.append("       SLCP_CD "+((getString("SLCP_CD").equals(""))?" is null ":"=")+getString("SLCP_CD")+" AND");
		sql.append("       ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+" AND");
		sql.append("       FM_TYP "+((getString("FM_TYP_6").equals(""))?" is null ":"=")+getString("FM_TYP_6")+"");
		sql.append("		");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		int updateCount = db.executeUpdate();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return updateCount;
	}

	public int INSERT_BM0301(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("		   INSERT INTO BM03(");
		sql.append("    SEQ_NO,");
		sql.append("    SLCP_CD,");
		sql.append("    ITM_NO,");
		sql.append("    APL_BDT,");
		sql.append("    APL_EDT,");
		sql.append("    GNR_ADM_NO,");
		sql.append("    TMP_AC_TYP,");
		sql.append("    SPLR_CD,");
		sql.append("    BPLN_YR,");
		sql.append("    NW_ITM_NO_TYP,");
		sql.append("    N_I_N_R_PLN_DT,");
		sql.append("    MFCC_CD,");
		sql.append("    ODR_DVSN_CD,");
		sql.append("    DSP_SPCF_CTNT,");
		sql.append("    PKG_MSR,");
		sql.append("    SLS_TRDT_CD,");
		sql.append("    SLS_CRCY_CD,");
		sql.append("    SLS_UP_APL_BGN_DT,");
		sql.append("    SLS_UP_APL_END_DT,");
		sql.append("    SLS_UP,");
		sql.append("    SLS_UP_D_L_PLC,");
		sql.append("    SLS_UP_APL_BGN_DT2,");
		sql.append("    SLS_UP_APL_END_DT2,");
		sql.append("    SLS_UP2,");
		sql.append("    SLS_UP_D_L_PLC2,");
		sql.append("    I_N_S_DCTN_DT,");
		sql.append("    B_BPLN_ITM_NO,");
		sql.append("    RPL_DVSN_CD,");
		sql.append("    GFT_ITM_TYP,");
		sql.append("    IMP_ITM_TYP,");
		sql.append("    DSP_ITM_TYP,");
		sql.append("    CNSMT_ITM_TYP,");
		sql.append("    SLS_PRMT_ITM_TYP,");
		sql.append("    PUR_ITM_TYP,");
		sql.append("    SLS_INNR_P_RT,");
		sql.append("    SLS_INNR_D_P_L_PLC,");
		sql.append("    SLS_INNR_P_RND_TYP,");
		sql.append("    SLS_STD_S_PRIZ,");
		sql.append("    SLS_TMP_S_PRIZ_TYP,");
		sql.append("    SLS_ODR_QTY_STD,");
		sql.append("    SLS_ODR_QTY_MAX,");
		sql.append("    SLS_ODR_QTY_MIN,");
		sql.append("    BPLN_PUR_PRIZ,");
		sql.append("    BPLN_SLS_PRIZ,");
		sql.append("    SLS_S_BGN_DT,");
		sql.append("    SLS_S_END_DT,");
		sql.append("    REAR_WHRS_CD,");
		sql.append("    SLS_ITM_ADM_TYP,");
		sql.append("    SLS_CAT_LRG,");
		sql.append("    SLS_CAT_MID,");
		sql.append("    SLS_CAT_SML,");
		sql.append("    SLS_SLS_DEPT,");
		sql.append("    PUR_UM,");
		sql.append("    INV_PUR_EXC_RT,");
		sql.append("    INV_UM,");
		sql.append("    DLVY_INV_EXC_RT,");
		sql.append("    DLVY_UM,");
		sql.append("    ADD_PRIZ_TAX_CD,");
		sql.append("    ADD_PRIZ_CAL_TYP,");
		sql.append("    ODR_MTHD,");
		sql.append("    SLS_SLS_CST_AC,");
		sql.append("	EMP1_ITM_TYP,");
		sql.append("	EMP2_ITM_TYP,");
		sql.append("	EMP3_ITM_TYP,");
		sql.append("	EMP4_ITM_TYP,");
		sql.append("	EMP5_ITM_TYP,");
		sql.append("	MAKER_KANSI_TYP,");
		sql.append("	PSI_ITM_TYP,");
		sql.append("	SLS_MIN_S_PRIZ,");
		sql.append("	SLS_PUR_PRIZ,");
		sql.append("    RGS_DTTM,");
		sql.append("    RGS_CHRG_CD,");
		sql.append("    RGS_PGID,");
		sql.append("    UPD_DTTM,");
		sql.append("    UPD_CHRG_CD,");
		sql.append("    UPD_PGID,");
		sql.append("    FM_TYP)");
		sql.append("    select SEQ_BM03.NEXTVAL,");
		sql.append("    SLCP_CD,");
		sql.append("    ITM_NO,");
		sql.append("    APL_BDT,");
		sql.append("    APL_EDT,");
		sql.append("    GNR_ADM_NO,");
		sql.append("    TMP_AC_TYP,");
		sql.append("    SPLR_CD,");
		sql.append("    BPLN_YR,");
		sql.append("    NW_ITM_NO_TYP,");
		sql.append("    N_I_N_R_PLN_DT,");
		sql.append("    MFCC_CD,");
		sql.append("    ODR_DVSN_CD,");
		sql.append("    DSP_SPCF_CTNT,");
		sql.append("    PKG_MSR,");
		sql.append("    SLS_TRDT_CD,");
		sql.append("    SLS_CRCY_CD,");
		sql.append("    SLS_UP_APL_BGN_DT,");
		sql.append("    SLS_UP_APL_END_DT,");
		sql.append("    SLS_UP,");
		sql.append("    SLS_UP_D_L_PLC,");
		sql.append("    SLS_UP_APL_BGN_DT2,");
		sql.append("    SLS_UP_APL_END_DT2,");
		sql.append("    SLS_UP2,");
		sql.append("    SLS_UP_D_L_PLC2,");
		sql.append("    I_N_S_DCTN_DT,");
		sql.append("    B_BPLN_ITM_NO,");
		sql.append("    RPL_DVSN_CD,");
		sql.append("    GFT_ITM_TYP,");
		sql.append("    IMP_ITM_TYP,");
		sql.append("    DSP_ITM_TYP,");
		sql.append("    CNSMT_ITM_TYP,");
		sql.append("    SLS_PRMT_ITM_TYP,");
		sql.append("    PUR_ITM_TYP,");
		sql.append("    SLS_INNR_P_RT,");
		sql.append("    SLS_INNR_D_P_L_PLC,");
		sql.append("    SLS_INNR_P_RND_TYP,");
		sql.append("    SLS_STD_S_PRIZ,");
		sql.append("    SLS_TMP_S_PRIZ_TYP,");
		sql.append("    SLS_ODR_QTY_STD,");
		sql.append("    SLS_ODR_QTY_MAX,");
		sql.append("    SLS_ODR_QTY_MIN,");
		sql.append("    BPLN_PUR_PRIZ,");
		sql.append("    BPLN_SLS_PRIZ,");
		sql.append("    SLS_S_BGN_DT,");
		sql.append("    SLS_S_END_DT,");
		sql.append("    REAR_WHRS_CD,");
		sql.append("    SLS_ITM_ADM_TYP,");
		sql.append("    SLS_CAT_LRG,");
		sql.append("    SLS_CAT_MID,");
		sql.append("    SLS_CAT_SML,");
		sql.append("    SLS_SLS_DEPT,");
		sql.append("    PUR_UM,");
		sql.append("    INV_PUR_EXC_RT,");
		sql.append("    INV_UM,");
		sql.append("    DLVY_INV_EXC_RT,");
		sql.append("    DLVY_UM,");
		sql.append("    ADD_PRIZ_TAX_CD,");
		sql.append("    ADD_PRIZ_CAL_TYP,");
		sql.append("    ODR_MTHD,");
		sql.append("    SLS_SLS_CST_AC,");
		sql.append("	EMP1_ITM_TYP,");
		sql.append("	EMP2_ITM_TYP,");
		sql.append("	EMP3_ITM_TYP,");
		sql.append("	EMP4_ITM_TYP,");
		sql.append("	EMP5_ITM_TYP,");
		sql.append("	MAKER_KANSI_TYP,");
		sql.append("	PSI_ITM_TYP,");
		sql.append("	SLS_MIN_S_PRIZ,");
		sql.append("	SLS_PUR_PRIZ,");
		sql.append("    RGS_DTTM,");
		sql.append("    RGS_CHRG_CD,");
		sql.append("    RGS_PGID,");
		sql.append("    UPD_DTTM,");
		sql.append("    UPD_CHRG_CD,");
		sql.append("    UPD_PGID,");
		sql.append("    FM_TYP");
		sql.append("		FROM M03 WHERE");
		sql.append("		SLCP_CD  "+((getString("SLCP_CD").equals(""))?" is null ":"=")+getString("SLCP_CD")+" AND");
		sql.append("		ITM_NO "+((getString("ITM_NO").equals(""))?" is null ":"=")+getString("ITM_NO")+"  AND");
		sql.append("		FM_TYP "+((getString("FM_TYP_6").equals(""))?" is null ":"=")+getString("FM_TYP_6")+"");
		sql.append("		");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		int updateCount = db.executeUpdate();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return updateCount;
	}

	public SelectResultRset SELECT_MDLNO01(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("SELECT ");
		sql.append("NVL(A.DCAT_CD ,       '') AS DCAT_CD ,");
		sql.append("NVL(B.GCAT_CD ,       '') AS GCAT_CD ");
		sql.append("FROM MDLNO A, DCAT B ");
		sql.append("WHERE ");
		sql.append("A.DCAT_CD = B.DCAT_CD(+) ");
		sql.append("AND ");
		sql.append("A.UNI_ITM_NO "+((getString("UNI_ITM_NO").equals(""))?" is null ":"=")+getString("UNI_ITM_NO")+" ");
		sql.append("AND ");
		sql.append("A.APL_BDT <"+((getString("nowDate").equals(""))?" is null ":"=")+getString("nowDate")+"  ");
		sql.append("AND ");
		sql.append("A.AC_END_DT >"+((getString("nowDate").equals(""))?" is null ":"=")+getString("nowDate")+" ");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}


	public void setSLCP_CD(String value){
		if(value==null) {
			paramsString.remove("SLCP_CD");
			return;
		}
		paramsString.put("SLCP_CD",value);
	}


	public void setITM_NO(String value){
		if(value==null) {
			paramsString.remove("ITM_NO");
			return;
		}
		paramsString.put("ITM_NO",value);
	}


	public void setAPL_BDT(String value){
		if(value==null) {
			paramsString.remove("APL_BDT");
			return;
		}
		paramsString.put("APL_BDT",value);
	}


	public void setAPL_EDT(String value){
		if(value==null) {
			paramsString.remove("APL_EDT");
			return;
		}
		paramsString.put("APL_EDT",value);
	}


	public void setGNR_ADM_NO(String value){
		if(value==null) {
			paramsString.remove("GNR_ADM_NO");
			return;
		}
		paramsString.put("GNR_ADM_NO",value);
	}


	public void setTMP_AC_TYP(String value){
		if(value==null) {
			paramsString.remove("TMP_AC_TYP");
			return;
		}
		paramsString.put("TMP_AC_TYP",value);
	}


	public void setSPLR_CD(String value){
		if(value==null) {
			paramsString.remove("SPLR_CD");
			return;
		}
		paramsString.put("SPLR_CD",value);
	}


	public void setBPLN_YR(String value){
		if(value==null) {
			paramsString.remove("BPLN_YR");
			return;
		}
		paramsString.put("BPLN_YR",value);
	}


	public void setNW_ITM_NO_TYP(String value){
		if(value==null) {
			paramsString.remove("NW_ITM_NO_TYP");
			return;
		}
		paramsString.put("NW_ITM_NO_TYP",value);
	}


	public void setN_I_N_R_PLN_DT(String value){
		if(value==null) {
			paramsString.remove("N_I_N_R_PLN_DT");
			return;
		}
		paramsString.put("N_I_N_R_PLN_DT",value);
	}


	public void setMFCC_CD(String value){
		if(value==null) {
			paramsString.remove("MFCC_CD");
			return;
		}
		paramsString.put("MFCC_CD",value);
	}


	public void setODR_DVSN_CD(String value){
		if(value==null) {
			paramsString.remove("ODR_DVSN_CD");
			return;
		}
		paramsString.put("ODR_DVSN_CD",value);
	}


	public void setDSP_SPCF_CTNT(String value){
		if(value==null) {
			paramsString.remove("DSP_SPCF_CTNT");
			return;
		}
		paramsString.put("DSP_SPCF_CTNT",value);
	}


	public void setPKG_MSR(String value){
		if(value==null) {
			paramsString.remove("PKG_MSR");
			return;
		}
		paramsString.put("PKG_MSR",value);
	}


	public void setSLS_TRDT_CD(String value){
		if(value==null) {
			paramsString.remove("SLS_TRDT_CD");
			return;
		}
		paramsString.put("SLS_TRDT_CD",value);
	}


	public void setSLS_CRCY_CD(String value){
		if(value==null) {
			paramsString.remove("SLS_CRCY_CD");
			return;
		}
		paramsString.put("SLS_CRCY_CD",value);
	}


	public void setSLS_UP_APL_BGN_DT(String value){
		if(value==null) {
			paramsString.remove("SLS_UP_APL_BGN_DT");
			return;
		}
		paramsString.put("SLS_UP_APL_BGN_DT",value);
	}


	public void setSLS_UP_APL_END_DT(String value){
		if(value==null) {
			paramsString.remove("SLS_UP_APL_END_DT");
			return;
		}
		paramsString.put("SLS_UP_APL_END_DT",value);
	}


	public void setSLS_UP(String value){
		if(value==null) {
			paramsString.remove("SLS_UP");
			return;
		}
		paramsString.put("SLS_UP",value);
	}


	public void setSLS_UP_D_L_PLC(String value){
		if(value==null) {
			paramsString.remove("SLS_UP_D_L_PLC");
			return;
		}
		paramsString.put("SLS_UP_D_L_PLC",value);
	}


	public void setSLS_UP_APL_BGN_DT2(String value){
		if(value==null) {
			paramsString.remove("SLS_UP_APL_BGN_DT2");
			return;
		}
		paramsString.put("SLS_UP_APL_BGN_DT2",value);
	}


	public void setSLS_UP_APL_END_DT2(String value){
		if(value==null) {
			paramsString.remove("SLS_UP_APL_END_DT2");
			return;
		}
		paramsString.put("SLS_UP_APL_END_DT2",value);
	}


	public void setSLS_UP2(String value){
		if(value==null) {
			paramsString.remove("SLS_UP2");
			return;
		}
		paramsString.put("SLS_UP2",value);
	}


	public void setSLS_UP_D_L_PLC2(String value){
		if(value==null) {
			paramsString.remove("SLS_UP_D_L_PLC2");
			return;
		}
		paramsString.put("SLS_UP_D_L_PLC2",value);
	}


	public void setI_N_S_DCTN_DT(String value){
		if(value==null) {
			paramsString.remove("I_N_S_DCTN_DT");
			return;
		}
		paramsString.put("I_N_S_DCTN_DT",value);
	}


	public void setB_BPLN_ITM_NO(String value){
		if(value==null) {
			paramsString.remove("B_BPLN_ITM_NO");
			return;
		}
		paramsString.put("B_BPLN_ITM_NO",value);
	}


	public void setRPL_DVSN_CD(String value){
		if(value==null) {
			paramsString.remove("RPL_DVSN_CD");
			return;
		}
		paramsString.put("RPL_DVSN_CD",value);
	}


	public void setGFT_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("GFT_ITM_TYP");
			return;
		}
		paramsString.put("GFT_ITM_TYP",value);
	}


	public void setIMP_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("IMP_ITM_TYP");
			return;
		}
		paramsString.put("IMP_ITM_TYP",value);
	}


	public void setDSP_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("DSP_ITM_TYP");
			return;
		}
		paramsString.put("DSP_ITM_TYP",value);
	}


	public void setCNSMT_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("CNSMT_ITM_TYP");
			return;
		}
		paramsString.put("CNSMT_ITM_TYP",value);
	}


	public void setSLS_PRMT_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("SLS_PRMT_ITM_TYP");
			return;
		}
		paramsString.put("SLS_PRMT_ITM_TYP",value);
	}


	public void setPUR_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("PUR_ITM_TYP");
			return;
		}
		paramsString.put("PUR_ITM_TYP",value);
	}


	public void setSLS_INNR_D_P_L_PLC(String value){
		if(value==null) {
			paramsString.remove("SLS_INNR_D_P_L_PLC");
			return;
		}
		paramsString.put("SLS_INNR_D_P_L_PLC",value);
	}


	public void setSLS_INNR_P_RND_TYP(String value){
		if(value==null) {
			paramsString.remove("SLS_INNR_P_RND_TYP");
			return;
		}
		paramsString.put("SLS_INNR_P_RND_TYP",value);
	}


	public void setSLS_STD_S_PRIZ(String value){
		if(value==null) {
			paramsString.remove("SLS_STD_S_PRIZ");
			return;
		}
		paramsString.put("SLS_STD_S_PRIZ",value);
	}


	public void setSLS_TMP_S_PRIZ_TYP(String value){
		if(value==null) {
			paramsString.remove("SLS_TMP_S_PRIZ_TYP");
			return;
		}
		paramsString.put("SLS_TMP_S_PRIZ_TYP",value);
	}


	public void setSLS_ODR_QTY_STD(String value){
		if(value==null) {
			paramsString.remove("SLS_ODR_QTY_STD");
			return;
		}
		paramsString.put("SLS_ODR_QTY_STD",value);
	}


	public void setSLS_ODR_QTY_MAX(String value){
		if(value==null) {
			paramsString.remove("SLS_ODR_QTY_MAX");
			return;
		}
		paramsString.put("SLS_ODR_QTY_MAX",value);
	}


	public void setSLS_ODR_QTY_MIN(String value){
		if(value==null) {
			paramsString.remove("SLS_ODR_QTY_MIN");
			return;
		}
		paramsString.put("SLS_ODR_QTY_MIN",value);
	}


	public void setBPLN_PUR_PRIZ(String value){
		if(value==null) {
			paramsString.remove("BPLN_PUR_PRIZ");
			return;
		}
		paramsString.put("BPLN_PUR_PRIZ",value);
	}


	public void setBPLN_SLS_PRIZ(String value){
		if(value==null) {
			paramsString.remove("BPLN_SLS_PRIZ");
			return;
		}
		paramsString.put("BPLN_SLS_PRIZ",value);
	}


	public void setSLS_S_BGN_DT(String value){
		if(value==null) {
			paramsString.remove("SLS_S_BGN_DT");
			return;
		}
		paramsString.put("SLS_S_BGN_DT",value);
	}


	public void setSLS_S_END_DT(String value){
		if(value==null) {
			paramsString.remove("SLS_S_END_DT");
			return;
		}
		paramsString.put("SLS_S_END_DT",value);
	}


	public void setREAR_WHRS_CD(String value){
		if(value==null) {
			paramsString.remove("REAR_WHRS_CD");
			return;
		}
		paramsString.put("REAR_WHRS_CD",value);
	}


	public void setSLS_ITM_ADM_TYP(String value){
		if(value==null) {
			paramsString.remove("SLS_ITM_ADM_TYP");
			return;
		}
		paramsString.put("SLS_ITM_ADM_TYP",value);
	}


	public void setSLS_CAT_LRG(String value){
		if(value==null) {
			paramsString.remove("SLS_CAT_LRG");
			return;
		}
		paramsString.put("SLS_CAT_LRG",value);
	}


	public void setSLS_CAT_MID(String value){
		if(value==null) {
			paramsString.remove("SLS_CAT_MID");
			return;
		}
		paramsString.put("SLS_CAT_MID",value);
	}


	public void setSLS_CAT_SML(String value){
		if(value==null) {
			paramsString.remove("SLS_CAT_SML");
			return;
		}
		paramsString.put("SLS_CAT_SML",value);
	}


	public void setSLS_SLS_DEPT(String value){
		if(value==null) {
			paramsString.remove("SLS_SLS_DEPT");
			return;
		}
		paramsString.put("SLS_SLS_DEPT",value);
	}


	public void setPUR_UM(String value){
		if(value==null) {
			paramsString.remove("PUR_UM");
			return;
		}
		paramsString.put("PUR_UM",value);
	}


	public void setINV_PUR_EXC_RT(String value){
		if(value==null) {
			paramsString.remove("INV_PUR_EXC_RT");
			return;
		}
		paramsString.put("INV_PUR_EXC_RT",value);
	}


	public void setINV_UM(String value){
		if(value==null) {
			paramsString.remove("INV_UM");
			return;
		}
		paramsString.put("INV_UM",value);
	}


	public void setDLVY_INV_EXC_RT(String value){
		if(value==null) {
			paramsString.remove("DLVY_INV_EXC_RT");
			return;
		}
		paramsString.put("DLVY_INV_EXC_RT",value);
	}


	public void setDLVY_UM(String value){
		if(value==null) {
			paramsString.remove("DLVY_UM");
			return;
		}
		paramsString.put("DLVY_UM",value);
	}


	public void setADD_PRIZ_TAX_CD(String value){
		if(value==null) {
			paramsString.remove("ADD_PRIZ_TAX_CD");
			return;
		}
		paramsString.put("ADD_PRIZ_TAX_CD",value);
	}


	public void setADD_PRIZ_CAL_TYP(String value){
		if(value==null) {
			paramsString.remove("ADD_PRIZ_CAL_TYP");
			return;
		}
		paramsString.put("ADD_PRIZ_CAL_TYP",value);
	}


	public void setODR_MTHD(String value){
		if(value==null) {
			paramsString.remove("ODR_MTHD");
			return;
		}
		paramsString.put("ODR_MTHD",value);
	}


	public void setSLS_SLS_CST_AC(String value){
		if(value==null) {
			paramsString.remove("SLS_SLS_CST_AC");
			return;
		}
		paramsString.put("SLS_SLS_CST_AC",value);
	}


	public void setEMP1_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("EMP1_ITM_TYP");
			return;
		}
		paramsString.put("EMP1_ITM_TYP",value);
	}


	public void setEMP2_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("EMP2_ITM_TYP");
			return;
		}
		paramsString.put("EMP2_ITM_TYP",value);
	}


	public void setEMP3_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("EMP3_ITM_TYP");
			return;
		}
		paramsString.put("EMP3_ITM_TYP",value);
	}


	public void setEMP4_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("EMP4_ITM_TYP");
			return;
		}
		paramsString.put("EMP4_ITM_TYP",value);
	}


	public void setEMP5_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("EMP5_ITM_TYP");
			return;
		}
		paramsString.put("EMP5_ITM_TYP",value);
	}


	public void setMAKER_KANSI_TYP(String value){
		if(value==null) {
			paramsString.remove("MAKER_KANSI_TYP");
			return;
		}
		paramsString.put("MAKER_KANSI_TYP",value);
	}


	public void setPSI_ITM_TYP(String value){
		if(value==null) {
			paramsString.remove("PSI_ITM_TYP");
			return;
		}
		paramsString.put("PSI_ITM_TYP",value);
	}


	public void setSLS_MIN_S_PRIZ(String value){
		if(value==null) {
			paramsString.remove("SLS_MIN_S_PRIZ");
			return;
		}
		paramsString.put("SLS_MIN_S_PRIZ",value);
	}
	
	public void setSLS_PUR_PRIZ(String value){
		if(value==null) {
			paramsString.remove("SLS_PUR_PRIZ");
			return;
		}
		paramsString.put("SLS_PUR_PRIZ",value);
	}


	public void setRGS_DTTM(String value){
		if(value==null) {
			paramsString.remove("RGS_DTTM");
			return;
		}
		paramsString.put("RGS_DTTM",value);
	}


	public void setRGS_CHRG_CD(String value){
		if(value==null) {
			paramsString.remove("RGS_CHRG_CD");
			return;
		}
		paramsString.put("RGS_CHRG_CD",value);
	}


	public void setRGS_PGID(String value){
		if(value==null) {
			paramsString.remove("RGS_PGID");
			return;
		}
		paramsString.put("RGS_PGID",value);
	}


	public void setUPD_DTTM(String value){
		if(value==null) {
			paramsString.remove("UPD_DTTM");
			return;
		}
		paramsString.put("UPD_DTTM",value);
	}


	public void setUPD_CHRG_CD(String value){
		if(value==null) {
			paramsString.remove("UPD_CHRG_CD");
			return;
		}
		paramsString.put("UPD_CHRG_CD",value);
	}


	public void setUPD_PGID(String value){
		if(value==null) {
			paramsString.remove("UPD_PGID");
			return;
		}
		paramsString.put("UPD_PGID",value);
	}


	public void setFM_TYP(String value){
		if(value==null) {
			paramsString.remove("FM_TYP");
			return;
		}
		paramsString.put("FM_TYP",value);
	}


	public void setNOT_FM_TYP_6(String value){
		if(value==null) {
			paramsString.remove("NOT_FM_TYP_6");
			return;
		}
		paramsString.put("NOT_FM_TYP_6",value);
	}


	public void setSLCP_CO(String value){
		if(value==null) {
			paramsString.remove("SLCP_CO");
			return;
		}
		paramsString.put("SLCP_CO",value);
	}


	public void setWHRS_CD(String value){
		if(value==null) {
			paramsString.remove("WHRS_CD");
			return;
		}
		paramsString.put("WHRS_CD",value);
	}


	public void setWHRD_TYP_2(String value){
		if(value==null) {
			paramsString.remove("WHRD_TYP_2");
			return;
		}
		paramsString.put("WHRD_TYP_2",value);
	}


	public void setWHRD_TYP_4(String value){
		if(value==null) {
			paramsString.remove("WHRD_TYP_4");
			return;
		}
		paramsString.put("WHRD_TYP_4",value);
	}


	public void setNOT_FM_TYP_X(String value){
		if(value==null) {
			paramsString.remove("NOT_FM_TYP_X");
			return;
		}
		paramsString.put("NOT_FM_TYP_X",value);
	}


	public void setNOT_FM_TYP_9(String value){
		if(value==null) {
			paramsString.remove("NOT_FM_TYP_9");
			return;
		}
		paramsString.put("NOT_FM_TYP_9",value);
	}


	public void setCD_TYP_CD(String value){
		if(value==null) {
			paramsString.remove("CD_TYP_CD");
			return;
		}
		paramsString.put("CD_TYP_CD",value);
	}


	public void setCTRL_DVSN_CD(String value){
		if(value==null) {
			paramsString.remove("CTRL_DVSN_CD");
			return;
		}
		paramsString.put("CTRL_DVSN_CD",value);
	}


	public void setVDR_CD(String value){
		if(value==null) {
			paramsString.remove("VDR_CD");
			return;
		}
		paramsString.put("VDR_CD",value);
	}


	public void setFM_TYP_6(String value){
		if(value==null) {
			paramsString.remove("FM_TYP_6");
			return;
		}
		paramsString.put("FM_TYP_6",value);
	}


	public void setUNI_ITM_NO(String value){
		if(value==null) {
			paramsString.remove("UNI_ITM_NO");
			return;
		}
		paramsString.put("UNI_ITM_NO",value);
	}


	public void setnowDate(String value){
		if(value==null) {
			paramsString.remove("nowDate");
			return;
		}
		paramsString.put("nowDate",value);
	}


	public void setSLS_INNR_P_RT_FREE(String value){
		if(value==null) {
			paramsFree.remove("SLS_INNR_P_RT");
			return;
		}
		paramsFree.put("SLS_INNR_P_RT",value);
	}


}
